var myVideo = videojs('myVideo', {
    preload:'auto',
    controls:true,
    playbackRates: [0.5, 1, 1.25, 1.5,2],
    textTrackDisplay : false,
    posterImage: false,
    errorDisplay : false,
    loop: false,
},function () {
    this.on('canplay',function(){
        console.log('canplay')
//            this.play()
    })
    this.on('loadedmetadata',function(){
        console.log('loadedmetadata')
    })
})
$(function () {
    $("#submit").on("submit", function (event) {
        var form = getFormData(this);
        $.get(form.api, {url: form.url}, function (res) {
            console.log(res.data)
            myVideo.src(res.data.url);
        })
        event.preventDefault();
    })
})